import request from '@/utils/request';
const Mvc = ''
import headApi from '@/utils/hade';
// 租户支出明细-获取数据列表  expenditure
export function selectCapPoolAccountRecordListPage(param) {
  return request({
    url:headApi + '/tenant/selectTenantExpenditureRecordPaging',
    method: 'post',
    data: param
  })
}
// 获取搜索下拉框
export function getProNameList() {
  return request({
    url:headApi+Mvc + '/capPoolAccount/getProNameList',
    method: 'post',
  })
}
// 搜索
export function selectCapPoolAccountRecordList(param) {

  return request({
    url:headApi+Mvc + '/capPoolAccount/selectCapPoolAccountRecordList',
    method: 'post',
    data: param
  })
}

// 租户-支出明细-获取卡片
export function capPoolAccountRecordStatistics(param) {
  return request({
    url:headApi + '/tenant/selectTenantExpenditureRecordSummary',
    method: 'post',
    data: param
  })
}


// 获取数据列表 summary
export function cpaTenantFinanceList(param) {
  return request({
    url:headApi+Mvc + '/cpaTenantFinance/cpaTenantFinanceList',
    method: 'post',
    data: param
  })
}
// 获取卡片
export function cpaTenantFinanceStatistics(param) {
  return request({
    url:headApi+ Mvc + '/cpaTenantFinance/cpaTenantFinanceStatistics',
    method: 'post',
    data: param
  })
}


// 获取提现记录 withdrawalsRecord
export function selectTransactionRecordPaging(param) {
  return request({
    url:headApi + '/user/selectTransactionRecordPaging',
    method: 'post',
    data: param
  });
}
// 获取提现记录汇总卡片 数据卡片
export function CapWithdrawalRecordStatistics(param) {
  return request({
    url:headApi + '/user/withdrawalSummary',
    method: 'post',
    data: param
  })
}
// 获取数据列表 userIndex 用户提现记录
export function selectCapUserWithdrawalAccountList(param) {
  return request({
    url:headApi+  Mvc + '/capUserWithdrawalAccount/selectCapUserWithdrawalAccountList',
    method: 'post',
    data: param
  })
}



// 获取数据列表 income 收入明细
export function selectCapUserWalletRecordList(param) {
  console.log(param, '22223333')
  return request({
    url:headApi+  Mvc + '/capUserWalletRecord/selectCapUserWalletRecordList',
    method: 'post',
    data: param
  })
}

// 获取数据卡片
export function capUserWalletRecordStatistics(param) {
  return request({
    url:headApi+ Mvc + '/capUserWalletRecord/capUserWalletRecordStatistics',
    method: 'post',
    data: param
  })
}

// 获取账户余额 AccountIndex
export function selectCapUserWalletById(param) {
  return request({
    url:headApi+ '/user/getUserWalletByUserId',
    method: 'get',
    params: param
  })
}

//我的账户-我的信息-新增银行卡和支付宝
export function insertCapUserWithdrawalAccountBank(param) {
  return request({
    url:headApi+ '/user/createUserWithdrawalAccount',
    method: 'post',
    data: param
  })
}



//我的账户-我的信息-获取银行卡和支付宝列表
export function bankAPI(param) {
  return request({
    url:headApi+ '/user/getUserWithdrawalAccounts',
    method: 'get',
    params: param
  })
}


//获取支付宝二维码图片  -记账本签约按钮
export function getUserSignAddresss(param) {
  return request({
    url:headApi+'/tenant/signByAlipayAccountBook',
    method: 'get',
    params: param
  })
}
//删除银行支付宝信息
export function deleteCapUserWithdrawalAccountById(param) {
  return request({
    url:headApi+ '/user/deleteUserWithdrawalAccount',
    method: 'get',
    params: param
  })
}
//修改银行支付宝信息
export function updateCapUserWithdrawalAccount(param) {
  return request({
    url:headApi+ '/user/updateUserWithdrawalAccount',
    method: 'post',
    data: param
  })
}

//账户设置-银联-新增
export function insertBankConfig(param) {
  return request({
    url:headApi + '/tenant/createSignAccountByWukong',
    method: 'get',
    params: param
  })
}

//账户设置-银联-列表
export function bankWkxxConfigList(param) {
  return request({
    url:headApi+  Mvc + '/cpaTenantFinance/bankWkxxConfigList',
    method: 'post',
    data: param
  })
}
//账户设置-银联-提现
export function withdrawbankCard(param) {
  return request({
    url:headApi+ Mvc + '/withdrawal/bankCard',
    method: 'get',
    params: param
  })
}
//账户设置-银联-签约
export function editWkxxConfig(param) {
  console.log(param,'像后端发')
  return request({
    url:headApi+  `/tenant/signByWukong`,
    method: 'get',
    params: param
  })
}
//用户的账户设置   Accountlndex
export function getIdentityAndTopId() {
  return request({
    url:headApi+ Mvc +'/selfcom/user/getIdentityAndTopId',
    method: 'get',
  })
}
//用户的账户设置-获取提现下拉框账号列表   Accountlndex
export function getTransferAccount(param) {
  return request({
    url:headApi+  Mvc+'/capUserWithdrawalAccount/getTransferAccount',
    method: 'get',
    params: param
  })
}
//用户的账户设置-提现确定   Accountlndex
export function bankCardAPI(param) {
  return request({
    url:headApi+'/user/userWithdrawal',
    method: 'get',
    params: param
  })
}


//批量打款记录 -批量打款记录详情列表  transfers  和锁定批次
export function findCapRemitPayList(param) {
  return request({
    url:headApi+'/tenant/createBatchPayment',
    method: 'post',
    data: param
  })
}
//批量打款记录 -批量打款-开始打款  transfers  
export function doTransfer(param) {
  return request({
    url:headApi+`/tenant/batchPayment/${param}`,
    method: 'get',
  })
}
//批量打款记录 -批量打款记录列表第二步-卡片  transfers
export function cpaRemitStatictiscList(param) {
  return request({
    url:headApi+'/tenant/selectBatchPaymentByBathNo',
    method: 'get',
    params: param
  })
}
//批量打款记录 -批量打款记录列表第二步-列表  transfers
export function selectBatchPaymentRecordPaging(param) {
  return request({
    url:headApi+'/tenant/selectBatchPaymentRecordPaging',
    method: 'get',
    params: param
  })
}

//批量打款记录-批量打款批次号   transfers
export function getBatchByUserId(param) {
  return request({
    url:headApi+'/tenant/selectBatchPaymentPaging',
    method: 'post',
    data: param
  })
}
//批量打款记录-批量打款卡片汇总   transfers
export function selectBatchPaymentSummary(param) {
  return request({
    url:headApi+'/tenant/selectBatchPaymentSummary',
    method: 'post',
    data: param
  })
}
//账户设置-添加记账本   userManage
export function addAlipayUserAccount(param) {
  return request({
    url:headApi+'/tenant/createSignAccountByAlipayAccountBook',
    method: 'get',
    params: param
  })
}
//账户设置-账户设置  列表
export function selectTenantExpenditureAccounts(param) {
  return request({
    url:headApi+ Mvc+`/tenant/selectTenantSignAccounts`,
    method: 'post',
    data: param
  })
}
//账户设置-记账本充值  
export function getAccountBookRechargeAdress(param) {
  return request({
    url:headApi+`/tenant/rechargeByAlipayAccountBook`,
    method: 'get',
    params: param
  })
}
//账户设置-修改支付名称 
export function editSignAccount(param) {
  return request({
    url:headApi+`/tenant/editSignAccount`,
    method: 'get',
    params: param
  })
}


//账户设置-添加支付宝
export function insertAlipayInfo(param) {
  return request({
    url:headApi+'/tenant/createSignAccountByAlipay',
    method: 'get',
    params: param
  })
}
//账户设置-添加薪账户
export function createSignAccountByPayAccount(param) {
  return request({
    url:headApi+`/tenant/createSignAccountByPayAccount?tenantId=${param.tenantId}&accountName=${param.accountName}&notes=${param.notes}`,
    method: 'get',
    // params: param
  })
}

//账户设置-签约支付宝
export function updateAlipayInfo(param) {
  return request({
    url:headApi+"/tenant/signByAlipay",
    method: 'get',
    params: param
  })
}
//账户设置-签约薪账户
export function signByPayAccount(param) {
  return request({
    url:headApi+"/tenant/signByPayAccount",
    method: 'get',
    params: param
  })
}
//账户设置-记账本-删除
export function updateAlipayUserAccount(param) {
  return request({
    url:headApi+"/tenant/rescind",
    method: 'get',
    params: param
  })
}
//账户设置-签约支付宝-证书上传
export function AlipayUpload(param) {
  return request({
    url:headApi+ Mvc+"/tenant/upload",
    method: 'post',
    data: param
  })
}
//账户设置-批量打款记录-发票申请 新增
export function invoiceApply(param) {
  return request({
    url:headApi+ Mvc+"/capital/invoiceApply",
    method: 'post',
    data: param
  })
}
//账户设置-批量打款记录-发票申请 编辑
export function editinvoiceApply(param) {
  return request({
    url:headApi+ Mvc+"/capital/invoiceApply",
    method: 'put',
    data: param
  })
}
//账户设置-批量打款记录-发票申请 获取发票数据
export function getinvoiceApply(param) {
  return request({
    url:headApi+ Mvc+`/capital/invoiceApply/${param}`,
    method: 'get',
    // params: param
  })
}
//账户设置-批量打款记录-发票申请记录列表 
export function getinvoiceApplyList(param) {
  return request({
    url:headApi+ Mvc+`/capital/invoiceApply/list`,
    method: 'post',
    data: param
  })
}
//账户设置-批量打款记录-新增邮寄地址 
export function addinvoicePost(param) {
  return request({
    url:headApi+`/capital/invoicePost`,
    method: 'post',
    data: param
  })
}
//账户设置-批量打款记录-获取邮寄地址 
export function getinvoicePost(param) {
  return request({
    url:headApi+ Mvc+`/capital/invoicePost/getInfoByWkxxId`,
    method: 'post',
    data: param
  })
}



//账户设置-批量打款记录-编辑邮寄地址 
export function editinvoicePost(param) {
  return request({
    url:headApi+ Mvc+`/capital/invoicePost`,
    method: 'put',
    data: param
  })
}
//账户设置-批量打款记录-新增公司信息-开通信息
export function addcompanyInfo(param) {
  return request({
    url:headApi+ Mvc+`/capital/companyInfo`,
    method: 'post',
    data: param
  })
}
//账户设置-批量打款记录-获取公司信息
export function getcompanyInfo(param) {
  return request({
    url:headApi+ Mvc+`/capital/companyInfo/${param}`,
    method: 'get',
  })
}
//账户设置-批量打款记录-编辑公司信息
export function editcompanyInfo(param) {
  return request({
    url:headApi+ Mvc+`/capital/companyInfo`,
    method: 'put',
    data:param
  })
}
//账户设置-批量打款记录-充值记录
export function rechargeList(param) {
  return request({
    url:headApi+ Mvc+`/capRechargeRecord/rechargeList`,
    method: 'post',
    data: param
  })
}

//账户设置-批量打款-上传文件
export function importExcel(param) {
  console.log(param,'表格')
  return request({
    url:headApi+ Mvc+`/capRemitPay/importExcel`,
    method: 'post',
    data: param
  })
}


//账户设置-批量打款-充值记录统计
export function rechargeListStatistics(param) {
  return request({
    url:headApi+ Mvc+`/capRechargeRecord/rechargeListStatistics`,
    method: 'post',
    data: param
  })
}
//提现记录 导出
export function exportXls(param) {
  return request({
    url:headApi+`/user/selectTransactionRecordExportExcel`,
    method: 'post',
    responseType: 'blob',
    data: param
  })
}
//支出收入明细的 导出
export function selectTenantExcel(param) {
  return request({
    url:headApi+`/tenant/selectTenantExpenditureRecordExportExcel`,
    method: 'post',
    responseType: 'blob',
    data: param
  })
}
//平台财务-列表 新接口
export function capTenantFinace1(param) {
  console.log(param,'参数')
  return request({
    url:headApi+ Mvc+`/capUserWallet/capTenantFinace1`,
    method: 'get',
    params: param
  })
}

//平台财务-用户的账户 发送手机验证码
export function Verification(param) {
  return request({
    url:headApi+`/sms/send`,
    method: 'get',
    params: param
  })
}
//租户-支出明细 支出类型搜索下拉框
export function tenantProjectList(param) {
  return request({
    url:headApi+ Mvc+`/business/project/tenantProjectList`,
    method: 'get',
    params: param
  })
}
//用户-支出明细 支出类型搜索下拉框
export function userProjectList(param) {
  return request({
    url:headApi+ Mvc+`/business/project/userProjectList`,
    method: 'get',
    params: param
  })
}
//用户-我的账户 提现弹窗查询手续费
export function getAmountFeeInfo(param) {
  return request({
    url:headApi+`/fee/getFeeInfo`,
    method: 'get',
    params: param
  })
}
//财务管理-账户设置-更新金额按钮
export function getAccountBalance(param) {
  return request({
    url:headApi+`/tenant/getAccountBalance`,
    method: 'get',
    params: param
  })
}